// 静态变量计数

#include <iostream>
using namespace std;

int SayHello();

int main() {
    for (int i = 0; i < 10; i++) {
        int times = SayHello();
        cout << "输出问候的次数为: " << times << "\n";
    }
}

int SayHello() {
    static int times = 0;
    cout << "你好\n";
    times++;
    return times;
}
